#include <iostream>
#include<map>


struct Test
{
    int x;
    char b;
    double c;
};

int main()
{

    std::map<int,std::string>m=
    {
        {1,"zhangshan"},
        {2,"lisi"}

    };
    for(auto&[id,name]:m)//结构化绑定
    {
        std::cout<<id<<" "<<name<<std::endl;
    }
    Test t={1,'a',3.14};
    auto &[a,b,c]=t;
    std::cout<<a<< " "<<b<<" "<<c<<std::endl;
    return 0;
}